const ajax = (url, data) => {
	var obj = new Promise(function(resolve, reject) {
		$.ajax({
			type: "get",
			url,
			data,
			success: (res) => {
				resolve(res);
			},
			error: (err) => {
				reject('请求失败');
			}
		});
	})
	return obj;
}